#region Using
using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;
#endregion Using

namespace CY.GFive.Core.Business
{
	public class Material : Business.BusinessBase<Material, int>
	{
		#region Fields and Properties

		private int num = 0;
		/// <summary>
		/// 
		/// </summary>
		public int Num
		{
			get { return num; }
			set
			{
				if (value != num)
				{
					MarkChanged("Num");
					num = value;
				}
			}
		}

		private String acceptResult = String.Empty;
		/// <summary>
		/// 
		/// </summary>
		public String AcceptResult
		{
			get { return acceptResult; }
			set
			{
				if (value != acceptResult)
				{
					MarkChanged("AcceptResult");
					acceptResult = value;
				}
			}
		}

		private DateTime arriveTimeDate = DateTime.MinValue;
		/// <summary>
		/// 
		/// </summary>
		public DateTime ArriveTimeDate
		{
			get { return arriveTimeDate; }
			set
			{
				if (value != arriveTimeDate)
				{
					MarkChanged("ArriveTimeDate");
					arriveTimeDate = value;
				}
			}
		}

		private DateTime preArriveDate = DateTime.MinValue;
		/// <summary>
		/// 
		/// </summary>
		public DateTime PreArriveDate
		{
			get { return preArriveDate; }
			set
			{
				if (value != preArriveDate)
				{
					MarkChanged("PreArriveDate");
					preArriveDate = value;
				}
			}
		}

		private DateTime bookDate = DateTime.MinValue;
		/// <summary>
		/// 
		/// </summary>
		public DateTime BookDate
		{
			get { return bookDate; }
			set
			{
				if (value != bookDate)
				{
					MarkChanged("BookDate");
					bookDate = value;
				}
			}
		}

		private String unitCode = String.Empty;
		/// <summary>
		/// 
		/// </summary>
		public String UnitCode
		{
			get { return unitCode; }
			set
			{
				if (value != unitCode)
				{
					MarkChanged("UnitCode");
					unitCode = value;
				}
			}
		}

		private Boolean inPosition = default(Boolean);
		/// <summary>
		/// 
		/// </summary>
		public Boolean InPosition
		{
			get { return inPosition; }
			set
			{
				if (value != inPosition)
				{
					MarkChanged("InPosition");
					inPosition = value;
				}
			}
		}

		private String code = String.Empty;
		/// <summary>
		/// 
		/// </summary>
		public String Code
		{
			get { return code; }
			set
			{
				if (value != code)
				{
					MarkChanged("Code");
					code = value;
				}
			}
		}

		#endregion Fields and Properties

		#region Constructors

		public Material()
		{
		}

		#endregion Constructors

		#region Base overrides

		protected override void ValidationRules()
		{
		}

		protected override Material DataSelect(int id)
		{
			return Services.DALService.MaterialService.Select(id);
		}

		protected override void DataUpdate()
		{
			Services.DALService.MaterialService.Update(this);
		}

		protected override void DataInsert()
		{
			Services.DALService.MaterialService.Insert(this);
		}

		protected override void DataDelete()
		{
			Services.DALService.MaterialService.Delete(this);
		}

		#endregion Base overrides
	}
}
